package com.qiyu.tech.task.callback;

/**
 * 心跳任务
 *
 * @Author idea
 * @Date created in 3:29 下午 2020/12/2
 */
public class HeartBeatTask implements Runnable{

    @Override
    public void run() {
        System.out.println("发送心跳指令");
    }

    public static void main(String[] args) {
        TimeWheel timeWheel = TimeWheel.buildDefaultTimeWheel();
        //3秒延迟，实现心跳策略
        timeWheel.add(new HeartBeatTask(),"heartBeatTask",3);
        while (true){

        }
    }
}
